package sql.record;

/**
 * Objects of this class represent a record to be inserted into the users table.
 * As can be seen below the user table consists of:
 * <ol>
 * 	<li>username: unique in the system</li>
 * 	<li>given-name</li>
 * 	<li>surname</li>
 * 	<li>phone-number</li>
 * 	<li>type: admin, regular user or both</li>
 * </ol>
 * @author Ron Galay
 *
 */
public class User extends TableRecord {

	@SQLType(type="VARCHAR(256)",primeKey=true,searchBy=true)
	public String userName;
	
	@SQLType(type="VARCHAR(256)")
	public String givenName;
	
	@SQLType(type="VARCHAR(256)")
	public String surName;
	
	@SQLType(type="VARCHAR(256)")
	public String phoneNumber;
	
	@SQLType(type="VARCHAR(256)")
	public String password;
	
	@SQLType(type="INTEGER")
	public Integer type;
	
	

	@Override
	protected TableRecord getInstanceFactory() {

		return new User();

	}
}
